projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c57b03
)
driver: mtd: sf_ops: claim bus while doing memcpy
author
Poddar, Sourav
<
[email protected]
>
Thu, 14 Nov 2013 15:31:15 +0000
(21:01 +0530)
committer
Jagannadha Sutradharudu Teki
<
[email protected]
>
Thu, 19 Dec 2013 06:53:22 +0000
(12:23 +0530)
claim spi bus while doing memory copy, this will set up
the spi controller device control register before doing
a memory read.
Signed-off-by: Sourav Poddar <
[email protected]
>
Tested-by: Yebio Mesfin <
[email protected]
>
Reviewed-by: Jagannadha Sutradharudu Teki <
[email protected]
>
drivers/mtd/spi/sf_ops.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/spi/sf_ops.c
b/drivers/mtd/spi/sf_ops.c
index 108665f4415f60433ccefa596b1c39e3836d5017..e316a692a8de61f0870b0022256cd44b30f71003 100644
(file)
--- a/
drivers/mtd/spi/sf_ops.c
+++ b/
drivers/mtd/spi/sf_ops.c
@@
-273,9
+273,15
@@
int spi_flash_cmd_read_ops(struct spi_flash *flash, u32 offset,
/* Handle memory-mapped SPI */
if (flash->memory_map) {
+ ret = spi_claim_bus(flash->spi);
+ if (ret) {
+ debug("SF: unable to claim SPI bus\n");
+ return ret;
+ }
spi_xfer(flash->spi, 0, NULL, NULL, SPI_XFER_MMAP);
memcpy(data, flash->memory_map + offset, len);
spi_xfer(flash->spi, 0, NULL, NULL, SPI_XFER_MMAP_END);
+ spi_release_bus(flash->spi);
return 0;
}